<?php use_helper('Javascript');?>
<div>
<h1>Lista de Tribunales</h1>

<table>
  <thead>
    <tr>
      <th>Ciudad</th>
      <th>Nombre</th>
      <th>Comuna</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($tribunalList as $tribunal): ?>
    <tr>
      <td><?php echo $tribunal->getCiudad() ?></td>
      <td><?php echo $tribunal->getNombre() ?></td>
      <td><?php echo $tribunal->getComuna() ?></td>
      <td><?php switch($accion):
					case 'show':
      					echo link_to_remote('Detalles', array(
      						'update' => 'acciones_tribunal',
      						'url' => 'administracion/showtribunal?id='.$tribunal->getId(),
      						'loading'=> visual_effect('appear','loading').
										visual_effect('highlight','list-search-tribunal', array('duration' => 0.5)).
										visual_effect('fade','list-search-tribunal', array('duration' => 0.5)),
							'complete' => visual_effect('fade','loading', array('duration' => 1.0)),
      					));
      					break;
					case 'edit':
						echo link_to_remote('Editar', array(
      						'update' => 'acciones_tribunal',
      						'url' => 'administracion/edittribunal?id='.$tribunal->getId(),
      						'loading'=> visual_effect('appear','loading').
										visual_effect('highlight','list-search-tribunal', array('duration' => 0.5)).
										visual_effect('fade','list-search-tribunal', array('duration' => 0.5)),
							'complete' => visual_effect('fade','loading', array('duration' => 1.0)),
      					)); 
						break;
					default : 
						echo "Otra accion";
				endswitch;
      		?>
     </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<?php echo link_to_function('Cerrar ventana',
	visual_effect('appear','loading').
	visual_effect('highlight','list-search-tribunal', array('duration' => 0.5)).
	visual_effect('fade','list-search-tribunal', array('duration' => 0.5)).
	visual_effect('fade','loading', array('duration' => 1.0)));
?>
</div>